using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace ICP_MS.Plugin.Experiment;

public class FormQC : Form
{
	public bool Checked = false;

	private IContainer components = null;

	private Label lblTip;

	private CheckBox chkProcess;

	private Button btnOk;

	private Button btnCancel;

	public FormQC()
	{
		InitializeComponent();
	}

	private void FormQC_Load(object sender, EventArgs e)
	{
		ApplyResources();
	}

	private void ApplyResources()
	{
		Text = Lang.Txt("AddFormQC.QCOverrun");
		chkProcess.Text = Lang.Txt("AddFormQC.QCOverrun");
		btnOk.Text = Lang.Txt("AddFormQC.Rewire");
		btnCancel.Text = Lang.Txt("AddFormQC.CancelCheck");
	}

	public DialogResult Check(string sample, string isotope)
	{
		lblTip.Text = string.Format(Lang.Txt("AddFormQC.Sample") + "{0}," + Lang.Txt("AddFormQC.Element") + "{1} " + Lang.Txt("AddFormQC.RangeOut"), sample, isotope);
		return ShowDialog();
	}

	private void btnOk_Click(object sender, EventArgs e)
	{
		base.DialogResult = DialogResult.OK;
	}

	private void btnCancel_Click(object sender, EventArgs e)
	{
		base.DialogResult = DialogResult.Cancel;
	}

	private void chkProcess_CheckedChanged(object sender, EventArgs e)
	{
		Checked = chkProcess.Checked;
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.lblTip = new System.Windows.Forms.Label();
		this.chkProcess = new System.Windows.Forms.CheckBox();
		this.btnOk = new System.Windows.Forms.Button();
		this.btnCancel = new System.Windows.Forms.Button();
		base.SuspendLayout();
		this.lblTip.Location = new System.Drawing.Point(12, 18);
		this.lblTip.Name = "lblTip";
		this.lblTip.Size = new System.Drawing.Size(323, 71);
		this.lblTip.TabIndex = 0;
		this.lblTip.Text = "。。。";
		this.chkProcess.AutoSize = true;
		this.chkProcess.Location = new System.Drawing.Point(83, 114);
		this.chkProcess.Name = "chkProcess";
		this.chkProcess.Size = new System.Drawing.Size(180, 16);
		this.chkProcess.TabIndex = 1;
		this.chkProcess.Text = "不再提示(后面元素同样处理)";
		this.chkProcess.UseVisualStyleBackColor = true;
		this.chkProcess.CheckedChanged += new System.EventHandler(chkProcess_CheckedChanged);
		this.btnOk.Location = new System.Drawing.Point(69, 166);
		this.btnOk.Name = "btnOk";
		this.btnOk.Size = new System.Drawing.Size(75, 29);
		this.btnOk.TabIndex = 2;
		this.btnOk.Text = "重新作线";
		this.btnOk.UseVisualStyleBackColor = true;
		this.btnOk.Click += new System.EventHandler(btnOk_Click);
		this.btnCancel.Location = new System.Drawing.Point(169, 166);
		this.btnCancel.Name = "btnCancel";
		this.btnCancel.Size = new System.Drawing.Size(75, 29);
		this.btnCancel.TabIndex = 3;
		this.btnCancel.Text = "取消校验";
		this.btnCancel.UseVisualStyleBackColor = true;
		this.btnCancel.Click += new System.EventHandler(btnCancel_Click);
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(347, 233);
		base.Controls.Add(this.btnCancel);
		base.Controls.Add(this.btnOk);
		base.Controls.Add(this.chkProcess);
		base.Controls.Add(this.lblTip);
		base.MaximizeBox = false;
		base.MinimizeBox = false;
		base.Name = "FormQC";
		this.Text = "QC超限处理";
		base.Load += new System.EventHandler(FormQC_Load);
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
